import InterfaceProxy from 'src/utils/mider'
import { defaultOptions } from './_options'

/**
 * 工具
 * @namespace iCommon
 */

/** @lends iCommon# */
const interfaceOpt = {
  uploadIcon: {
    url: '/v1/common-api/upload/icon/',
    method: 'post'
  },
  uploadBackground: {
    url: '/v1/common-api/upload/background',
    method: 'post'
  },
  systemConfig: {
    url: '/p/v1/system-api/config',
    params: {
      id: String
    }
  }
}

/** @mixes iCommon */
const iCommon = new InterfaceProxy(interfaceOpt, [defaultOptions])
export default iCommon
